<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
          splice()
            方法可以通过指定的索引号和个数，提取数组的某个部分
          语法：
            数组名.splic(start[,number]);
            start (必须)：规定开始选取索引号
            number (可选)：元素个数
        */

        let arr = ['张飞0', '关羽1', '刘备2', '猴子3', '黑鸟4', '剑圣5'];

        // let arr2=arr.splice(2,2);
        let arr2 =arr.splice(2);
        console.log(arr2);
        console.log(arr);
    </script>
</body>
</html>